{if $smarty.get.print != 1}
  {include file="header.tpl"}
{else}
  {include file="headerPrint.tpl"}
{/if}
<div>  
<table border="0" align="center" width="100%" cellspacing="4" cellpadding="2">
  <tr>
  </tr>
  <tr>
    <td colspan="5">{$l_billBookDetailId} : {$billBookNo}&nbsp;&nbsp;&nbsp;{$l_party} : {$partyName}</td>
    <td colspan="6">{$l_billBookDate} : {$billBookDate}</td>
  </tr>
  <tr><th align="left">Rough Purchase</th></tr>
  <tr>
    <th>&nbsp;</th>
    <th align="left">{$l_particulars}</th>
    <th align="right">{$l_weight}</th>
    <th align="right">{$l_pari}</th>
    <th align="right">{$l_netWeight}</th>
    <th align="right">{$l_touch}</th>
    <th align="right">{$l_waste}</th>
    <th align="right">{$l_fine}</th>
    <th align="right">particular</th>
    <th align="right">{$l_qty}</th>
    <th align="right">{$l_labour}</th>
    <th align="right">{$l_amount}</th>
  </tr>
  {section name="sec" loop=$billBookDetail|@count}
  <tr>
    <td>{$smarty.section.sec.rownum}</td>
    <td>{$billBookDetail[sec].particulars}</td>
    <td align="right" style="border-right:1px solid;">{if $billBookDetail[sec].weight != 0}{$billBookDetail[sec].weight|string_format:"%.0f"}{/if}</td>
    <td align="right" style="border-right:1px solid;">{if $billBookDetail[sec].pari != 0}{$billBookDetail[sec].pari|string_format:"%.0f"}{/if}</td>
    <td align="right" style="border-right:1px solid;">{if $billBookDetail[sec].netWeight != 0}{$billBookDetail[sec].netWeight|string_format:"%.0f"}{/if}</td>
    <td align="right" style="border-right:1px solid;">{if $billBookDetail[sec].touch != 0}{$billBookDetail[sec].touch|string_format:"%.2f"}{/if}</td>
    <td align="right" style="border-right:1px solid;">{if $billBookDetail[sec].waste != 0}{$billBookDetail[sec].waste|string_format:"%.2f"}{/if}</td>
    <td align="right" style="border-right:1px solid;">{if $billBookDetail[sec].fine != 0}{$billBookDetail[sec].fine|string_format:"%.0f"}{/if}</td>
    <td align="right" style="border-right:1px solid;">{$billBookDetail[sec].particular}</td>
    <td align="right" style="border-right:1px solid;">{if $billBookDetail[sec].qty != 0}{$billBookDetail[sec].qty|string_format:"%.0f"}{/if}</td>
    <td align="right" style="border-right:1px solid;">{if $billBookDetail[sec].labour != 0}{$billBookDetail[sec].labour|string_format:"%.2f"}{/if}</td>
    <td align="right" style="border-right:1px solid;">{if $billBookDetail[sec].amount != 0}{$billBookDetail[sec].amount|string_format:"%.0f"}{/if}</td>
  </tr>
  {/section}
  <tr><td colspan="13"><hr/><td></tr>
  <tr>
    <th align="center" colspan="4">{$l_total}</th>
    <th align="right">{$total.netWeight|string_format:"%.0f"}</th>
    <th colspan="2">&nbsp;</th>
    <th align="right">{$total.fine|string_format:"%.0f"}</th>
    <th></th>
    <th align="right">&nbsp;</th>
    <th align="right">&nbsp;</th>
    <th align="right">{$total.amount|string_format:"%.0f"}</th>
  </tr>
  </table>
  <br/>
  {if $showPrev == 1}
	  <b>{if $prevFine >= 0} Total Debit Fine:{else} Total Credit Fine:{/if} </b>{$prevFine|string_format:"%.0f"}<br/>
	  <b>{if $prevAmount >= 0} Total Debit Fine:{else} Total Credit Fine:{/if} </b>{$prevAmount|string_format:"%.0f"}
	{/if}
</div>
{if $smarty.get.print != 1}
  {include file="footer.tpl"}
{/if}
